const boxs = document.querySelectorAll('.box')

boxs.forEach(function(box) {
  box.addEventListener('mousemove', function(e) {
    const x = e.pageX - box.offsetLeft
    const y = e.pageY - box.offsetTop

    document.querySelectorAll('span').forEach(function(span){
      span.style.left = `${x}px`
      span.style.top = `${y}px`
    })
  })
})